import React from 'react';
import { inject, observer } from 'mobx-react';
import { WeaDialog, WeaLocaleProvider } from 'ecCom';
import Content from './Content';
const getLabel = WeaLocaleProvider.getLabel;

@inject('wfMobileSettingStore')
@observer
export default class Main extends React.Component {
    render() {
        const { apptype } = this.props;
        let dialogStyle = (apptype == 10) ? { width: "650px", height: "531px" } : { width: "550px", height: "350px" };
        return (
            <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@dhylg0`}
                visible={true}
                title={getLabel(31811, '应用设置')}
                icon="icon-coms-workflow"
                iconBgcolor='#0079DE'
                maskClosable={false}
                onCancel={this.doCancel}
                style={dialogStyle}
            >
                <Content ecId={`${this && this.props && this.props.ecId || ''}_Content@qppzvn`} {...this.props} />
            </WeaDialog>
        )
    }
    doCancel = () =>  {
        const { onCancel } = this.props;
        onCancel();
    }
}